package com.example.oauth2demo.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;

/**
 * TODO
 *
 * @author karidyang
 * @since 1.0
 * Date: 2021-04-27
 **/
@Configuration
@Order(98)
public class HttSecurityConfig2 extends WebSecurityConfigurerAdapter {

    @Override
    protected void configure(HttpSecurity http) throws Exception {

        http.authorizeRequests().antMatchers("/", "/login_back").permitAll();
//        http.authorizeRequests().antMatchers("/foo").permitAll();
        System.out.println("HttSecurityConfig2 [" + http + "]");

    }

}
